<?php
namespace  App\Interfaces;
use App\Listener\Agent;
use App\model\Workshop;
use App\User;
use App\UserShenhe;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Http\Request;
use \Illuminate\Contracts\Pagination\Paginator;

/**
 * Created by PhpStorm.
 * User: Raytine
 * Date: 2019/11/11
 * Time: 23:53
 */

interface WorkshopInterFace
{
    //去除编辑器style
    public function removeWorkshopDescStyle($workshop);
    public function mangerUpdatedPanyuan($request,$workshop);
    public function CreateWorkshopNotice(Workshop $workshop,$code);
    /**
     * @param User $user
     * @param Request $request
     * @return Disksource
     */
    public function addDiskSource(User $user,Request $request):Workshop;
    /**
     * 编辑盘源
     */
    public function editDiskSource(User $user,Workshop $disksource,$request);
    /**
     *
     */
    public function updatedPanyuan(User $user,UserShenhe $userShenhe,Workshop $workshop);
    /**
     * 审核通过
     */
    public function diskSourcePassed(User $user,Workshop $disksource,UserShenhe $userShenhe);
    /**
     * 审核不通过
     */
    public function diskSourceRefuse(User $user,Workshop $disksource,UserShenhe $userShenhe,$refuseReason);
    public function viewSourceRefuse(User $user,Workshop $disksource,UserShenhe $userShenhe,$refuseReason);
    public function updateSourceRefuse(User $user,Workshop $disksource,UserShenhe $userShenhe,$refuseReason);
    /**
     * 同步到官网
     */
    public function syncWebsite(Workshop $disksource):bool ;
    /**
     * 推送给所有人
     */
    public function allUserNotice(Workshop $disksource):bool ;
    /**
     * 录入盘源提醒
     */
    public function addDiskSourceNotice(Workshop $disksource):bool ;
    /**
     * 审核不通过收到提醒
     */
    public function refuseDiskSourceNotice(Workshop $disksource):bool;
    /**
     * 盘源列表
     */
    public function DiskSourceList(Request $request):Paginator;
    public function applyWorkshopNotice(User $user,Workshop $workshop,$code);
    /**
     * 查看业主通过
     */
    public function passView(User $user,UserShenhe $userShenhe,Workshop $workshop);
    /**
     * 附近的盘源
     */
    public function DiskSourceNear(Workshop $disksource):Collection;
    /**
     * 盘源获取经纬度
     */
    public function DiskSourceGeo(Workshop $workshop):bool;
    /**
     * 获取推荐的房源
     */
    public function workshopRecommd($limit);
    /**
     * 生成小程序二维码
     */
    public function miniQrcode(Workshop $workshop,\App\model\agent\Agent $agent);
    /**
     * 生成编码
     */
    public function getCode(Workshop $workshop);
}
